//
// Created by Administrator on 2023-12-26
// 高精度计算--加法
// OJ:https://www.luogu.com.cn/problem/P1601
// https://oj.youdao.com/problem/351?from=problems
//

/*
123+333=456
123+33=156
99+99 = 198
99+9999=10098
 */
#include <iostream>
using namespace std;

int main()
{
    string a,b,sum;
    a="99";
    b="9999";
    cin>>a>>b;
    // 让a是短的
    if (a.size()>b.size())
        swap(a,b);
    while(a.size()<b.size())
    {
        a="0"+a;
    }
    // 从个位数开始相加
    bool add_one = false;
    for (int i = a.size()-1; i >=0; --i)
    {
        int aa=a[i]-'0',bb=b[i]-'0';
        int aabb= aa+bb;
        if (add_one)
            ++aabb;
        // 取个位数
        int gewei = aabb%10;
        sum=to_string(gewei)+sum;
        add_one = aabb >= 10;
    }
    if(add_one)
        sum="1"+sum;
    cout<<sum;
    return 0;
}